" We're going to define single-letter keymaps, so don't try to define them
" in the terminal window.  The debugger CLI should continue accepting text commands.
function! NvimGdbNoTKeymaps()
  tnoremap <silent> <buffer> <esc> <c-\><c-n>
endfunction

let g:nvimgdb_disable_start_keymaps=1
noremap <LEADER>dd :GdbStart gdb -x commands -q %<
noremap <LEADER>dl :GdbStartLLDB lldb -s afterLoad %<

let g:nvimgdb_config_override = {
  \ 'key_next': 'n',
  \ 'key_step': 's',
  \ 'key_finish': 'f',
  \ 'key_continue': 'c',
  \ 'key_until': 'u',
  \ 'key_breakpoint': 'b',
  \ 'key_quit':       'Q',
  \ 'set_tkeymaps': "NvimGdbNoTKeymaps",
  \ 'sign_current_line': '',
  \ 'sign_breakpoint': [ '', '','','', '', '', '', '', '','' ],
  \ }


"default config
"let g:nvimgdb_config = {
"  \ 'key_until':      '<f4>',
"  \ 'key_continue':   '<f5>',
"  \ 'key_next':       '<f10>',
"  \ 'key_step':       '<f11>',
"  \ 'key_finish':     '<f12>',
"  \ 'key_breakpoint': '<f8>',
"  \ 'key_frameup':    '<c-p>',
"  \ 'key_framedown':  '<c-n>',
"  \ 'key_eval':       '<f9>',
"  \ 'key_quit':       None,
"  \ 'set_tkeymaps':   'function("GdbCallAsync", "keymaps.set_t")',
"  \ 'set_keymaps':    'function("GdbCallAsync", "keymaps.set")',
"  \ 'unset_keymaps':  'function("GdbCallAsync", "keymaps.unset")',
"  \ 'sign_current_line': '▶',
"  \ 'sign_breakpoint': [ '●', '●²', '●³', '●⁴', '●⁵', '●⁶', '●⁷', '●⁸', '●⁹', '●ⁿ' ],
"  \ 'sign_breakpoint_priority': 10,
"  \ 'codewin_command': 'new'
"  \ }
